﻿@model ApplicationDto

<style>
    .mat-column-code {
        max-width: 180px;
    }

    .mat-column-name {
        max-width: 60%;
    }

    .mat-column-enabled {
        max-width: 80px;
    }

    .mat-column-registerEnabled {
        max-width: 80px;
    }

    .mat-column-creationTime {
        max-width: 120px;
    }

    .mat-column-operation {
        max-width: 120px;
    }
</style>
<util-toolbar>
    <util-layout>
        <util-a styles="Icon" tooltip="添加应用程序" link="create">
            <util-icon font-awesome-icon="Plus"></util-icon>
        </util-a>
        <util-button styles="Icon" tooltip="批量删除" on-click="delete()">
            <util-icon material-icon="Delete"></util-icon>
        </util-button>
        <util-button styles="Icon" tooltip="刷新" on-click="refresh()">
            <util-icon material-icon="Sync"></util-icon>
        </util-button>
    </util-layout>
</util-toolbar>
<util-layout>
    <util-layout-item>
        <util-textbox model="queryParam.keyword" placeholder="搜索" on-change="search()"></util-textbox>
    </util-layout-item>
</util-layout>
<util-table id="tableApplication" key="application" query-param="queryParam" base-url="application"
            sort="CreationTime" sort-direction="Desc" max-height="500">
    <util-table-column type="Checkbox"></util-table-column>
    <util-table-column type="LineNumber"></util-table-column>
    <util-table-column for="Code" sort="true"></util-table-column>
    <util-table-column for="Name" sort="true"></util-table-column>
    <util-table-column for="Enabled" sort="true"></util-table-column>
    <util-table-column for="RegisterEnabled" sort="true"></util-table-column>
    <util-table-column for="CreationTime" sort="true"></util-table-column>
    <util-table-column title="操作" column="operation">
        <util-table-cell>
            <util-a styles="Icon" tooltip="编辑" bind-link="['update',row.id]">
                <util-icon material-icon="Edit"></util-icon>
            </util-a>
            <util-button styles="Icon" menu-id="menu">
                <util-icon material-icon="More_Vert"></util-icon>
                <util-menu id="menu">
                    <util-menu-item label="删除" material-icon="Delete" on-click="delete(row.id)"></util-menu-item>
                    <util-menu-item label="查看详细" material-icon="Visibility" bind-link="['detail',row.id]"></util-menu-item>
                </util-menu>
            </util-button>
        </util-table-cell>
    </util-table-column>
</util-table>